<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">




<title>Log4Net ，.net和SQL Server的完美结合 - 拂晓风起 - 博客园</title>
<meta name="keywords" content="log4net,Log4Net,.net和SQL,Server的完美结合">



<link title="RSS" type="application/rss+xml" rel="alternate" href="http://www.cnblogs.com/kenkofox/rss">
<link title="RSD" type="application/rsd+xml" rel="EditURI" href="http://www.cnblogs.com/kenkofox/rsd.xml"> 
  



<link rel="stylesheet" type="text/css" href="index.css" media="all">
</head><body>
    <form name="Form1" method="post" action="http://www.cnblogs.com/kenkofox/archive/2009/08/12/1544501.html" id="Form1">
<div>
<input name="__EVENTTARGET" id="__EVENTTARGET" value="" type="hidden">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" type="hidden">
<input name="__VIEWSTATE" id="__VIEWSTATE" value="" type="hidden">
</div>




        
<!--done-->
<center>
<div id="home">
<div id="header">
	<div id="blogTitle">
	<a id="lnkBlogLogo" href="http://www.cnblogs.com/kenkofox/"><img id="blogLogo" src="logo.gif" alt=""></a>			
		
<!--done-->
<h1><a id="Header1_HeaderTitle" class="headermaintitle" href="http://www.cnblogs.com/kenkofox/">拂晓风起</a></h1>
<h2></h2>



		
	</div><!--end: blogTitle 博客的标题和副标题 -->
	<div id="navigator">
		
<!--done-->
			<ul id="navList">
				<li><a id="MyLinks1_HomeLink" class="menu" href="http://www.cnblogs.com/">博客园</a></li>
				<li><a id="MyLinks1_SpaceLink" class="menu" href="http://space.cnblogs.com/">社区</a></li>
				<li><a id="MyLinks1_MyHomeLink" class="menu" href="http://www.cnblogs.com/kenkofox/">首页</a></li>
				<li><a id="MyLinks1_NewPostLink" class="menu" href="http://www.cnblogs.com/kenkofox/admin/EditPosts.aspx?opt=1">新随笔</a></li>
				<li><a id="MyLinks1_ContactLink" accesskey="9" class="menu" href="http://space.cnblogs.com/msg/send/%e6%8b%82%e6%99%93%e9%a3%8e%e8%b5%b7">联系</a></li>
				<li><a id="MyLinks1_Admin" class="menu" href="http://www.cnblogs.com/kenkofox/admin/EditPosts.aspx">管理</a></li>
				<li><a id="MyLinks1_Syndication" class="menu" href="http://www.cnblogs.com/kenkofox/rss">订阅</a>
				<a id="MyLinks1_XMLLink" class="aHeaderXML" href="http://www.cnblogs.com/kenkofox/rss"><img src="rss.gif" alt="订阅" style="border-width: 0px;"></a></li>
			</ul>


		<div class="blogStats">
			
			
<!--done-->
随笔- 13&nbsp;
文章- 0&nbsp;
评论- 0&nbsp;

			
		</div><!--end: blogStats -->
	</div><!--end: navigator 博客导航栏 -->
</div><!--end: header 头部 -->

<div class="clear"></div>
	<div id="topicList">
		
					
<!--done-->
<div id="topics">
	<div class="post">
		<h1 class="postTitle">
			<a id="ctl04_TitleUrl" class="postTitle2" href="http://www.cnblogs.com/kenkofox/archive/2009/08/12/1544501.html">Log4Net ，.net和SQL Server的完美结合</a>
		</h1>
		<div class="clear"></div>
		<div class="postBody">
			<a href="http://www.cnblogs.com/zhengyun_ustc/archive/2005/07/19/196049.html">参考郑大哥的这篇文章，http://www.cnblogs.com/zhengyun_ustc/archive/2005/07/19/196049.html</a> <br>不过，我在我这个项目中，具体使用的方法有点不同。<br>这个学生处学生信息管理系统，业务日志比较简单，其实并不需要使用log4net。所以在这个项目中，只用log4net来记录错误日志。<br><br>1.建立配置文件。以下配置，是把信息记录到数据库和一个以当前日期为名字的日志txt文件。从数据库的insert语句就可以看出数据库的<br>
<div class="cnblogs_code"><img style="display: none;" id="Code_Closed_Image_100745" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_100745').style.display='none'; document.getElementById('Code_Open_Image_100745').style.display='inline'; document.getElementById('Code_Open_Text_100745').style.display='inline';" src="contractedblock.gif" align="top" height="16" width="11"><img id="Code_Open_Image_100745" style="display: inline;" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_100745').style.display='none'; getElementById('Code_Closed_Image_100745').style.display='inline'; getElementById('Code_Closed_Text_100745').style.display='inline';" src="expandedblockstart.gif" align="top" height="16" width="11"><span style="display: none;" class="cnblogs_code_Collapse" id="Code_Closed_Text_100745">Code</span><span id="Code_Open_Text_100745" style="display: inline;"><br><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: rgb(0, 0, 255);">&lt;?</span><span style="color: rgb(255, 0, 255);">xml&nbsp;version="1.0"&nbsp;encoding="utf-8"&nbsp;</span><span style="color: rgb(0, 0, 255);">?&gt;</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">configuration</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">configSections</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">section&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="log4net"</span><span style="color: rgb(255, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 255);">="log4net.Config.Log4NetConfigurationSectionHandler,&nbsp;log4net"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">configSections</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">log4net</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">appender&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="ADONetAppender"</span><span style="color: rgb(255, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 255);">="log4net.Appender.AdoNetAppender"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">bufferSize&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="1"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">connectionType&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="System.Data.SqlClient.SqlConnection,&nbsp;System.Data,&nbsp;Version=1.0.3300.0,&nbsp;Culture=neutral,&nbsp;PublicKeyToken=b77a5c561934e089"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">connectionString&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="server=codebase;database=StuDepartmentOA;uid=sadis;pwd=123;timeout=300;"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">commandText&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="INSERT&nbsp;INTO&nbsp;ErrLog&nbsp;([Time],[errLevel],[Info],[Exception])&nbsp;VALUES&nbsp;(@time,&nbsp;@level,&nbsp;@info,&nbsp;@exception)"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameterName&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="@time"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">dbType&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="DateTime"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">layout&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="log4net.Layout.RawTimeStampLayout"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameterName&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="@level"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">dbType&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="String"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">size&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="8"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">layout&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="log4net.Layout.PatternLayout"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">conversionPattern&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="%p"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">layout</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameterName&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="@info"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">dbType&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="String"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">size&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="200"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">layout&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="log4net.Layout.PatternLayout"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">conversionPattern&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="%m"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">layout</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">parameterName&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="@exception"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">dbType&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="String"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">size&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="1000"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">layout&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="log4net.Layout.PatternLayout"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">conversionPattern&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="%exception"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">layout</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">parameter</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">appender</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">appender&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="FileErrLogAppender"</span><span style="color: rgb(255, 0, 0);">&nbsp;type</span><span style="color: rgb(0, 0, 255);">="log4net.Appender.RollingFileAppender"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">日志文件的存储路径</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">file&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="bin\Log\"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">appendToFile&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="true"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">rollingStyle&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="Date"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">datePattern&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="yyyy-MM-dd.LOG"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">根据日期，定义文件名</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">staticLogFileName&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="false"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">日志文件输出格式</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">layout&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">type</span><span style="color: rgb(0, 0, 255);">="log4net.Layout.PatternLayout"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="Header"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="[Header]"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">param&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="Footer"</span><span style="color: rgb(255, 0, 0);">&nbsp;value</span><span style="color: rgb(0, 0, 255);">="[Footer]"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">ConversionPattern&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="%nTime:&nbsp;%d&nbsp;%n&nbsp;Level:&nbsp;%level&nbsp;&nbsp;&nbsp;Info:&nbsp;%message&nbsp;%nException:&nbsp;%exception"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">layout</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">appender</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Setup&nbsp;the&nbsp;root&nbsp;category,&nbsp;add&nbsp;the&nbsp;appenders&nbsp;and&nbsp;set&nbsp;the&nbsp;default&nbsp;level&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">root</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">level&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="WARN"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">level&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="INFO"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">level&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="DEBUG"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">root</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);">&lt;!--</span><span style="color: rgb(0, 128, 0);">&nbsp;Specify&nbsp;the&nbsp;level&nbsp;for&nbsp;some&nbsp;specific&nbsp;categories&nbsp;</span><span style="color: rgb(0, 128, 0);">--&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">logger&nbsp;</span><span style="color: rgb(255, 0, 0);">name</span><span style="color: rgb(0, 0, 255);">="logger"</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">level&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="WARN"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">level&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="INFO"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">level&nbsp;</span><span style="color: rgb(255, 0, 0);">value</span><span style="color: rgb(0, 0, 255);">="DEBUG"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">appender-ref&nbsp;</span><span style="color: rgb(255, 0, 0);">ref</span><span style="color: rgb(0, 0, 255);">="FileErrLogAppender"</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;</span><span style="color: rgb(128, 0, 0);">appender-ref&nbsp;</span><span style="color: rgb(255, 0, 0);">ref</span><span style="color: rgb(0, 0, 255);">="ADONetAppender"</span><span style="color: rgb(255, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">/&gt;</span><span style="color: rgb(0, 0, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">logger</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br><br>&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">log4net</span><span style="color: rgb(0, 0, 255);">&gt;</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">&lt;/</span><span style="color: rgb(128, 0, 0);">configuration</span><span style="color: rgb(0, 0, 255);">&gt;</span></span></div><br>对应的数据库表：<br>
<div class="cnblogs_code"><img style="display: none;" id="Code_Closed_Image_101013" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_101013').style.display='none'; document.getElementById('Code_Open_Image_101013').style.display='inline'; document.getElementById('Code_Open_Text_101013').style.display='inline';" src="contractedblock.gif" align="top" height="16" width="11"><img id="Code_Open_Image_101013" style="display: inline;" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_101013').style.display='none'; getElementById('Code_Closed_Image_101013').style.display='inline'; getElementById('Code_Closed_Text_101013').style.display='inline';" src="expandedblockstart.gif" align="top" height="16" width="11"><span style="display: none;" class="cnblogs_code_Collapse" id="Code_Closed_Text_101013">Code</span><span id="Code_Open_Text_101013" style="display: inline;"><br><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: rgb(0, 0, 255);">USE</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">StuDepartmentOA</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">GO</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 128, 128);">/*</span><span style="color: rgb(0, 128, 128);">*****&nbsp;对象:&nbsp;&nbsp;Table&nbsp;[dbo].[ErrLog]&nbsp;&nbsp;&nbsp;&nbsp;脚本日期:&nbsp;08/16/2009&nbsp;10:09:31&nbsp;*****</span><span style="color: rgb(0, 128, 128);">*/</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">SET</span><span style="color: rgb(0, 0, 0);">&nbsp;ANSI_NULLS&nbsp;</span><span style="color: rgb(0, 0, 255);">ON</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">GO</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">SET</span><span style="color: rgb(0, 0, 0);">&nbsp;QUOTED_IDENTIFIER&nbsp;</span><span style="color: rgb(0, 0, 255);">ON</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">GO</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">SET</span><span style="color: rgb(0, 0, 0);">&nbsp;ANSI_PADDING&nbsp;</span><span style="color: rgb(0, 0, 255);">ON</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">GO</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">CREATE</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">TABLE</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">dbo</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">.</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">ErrLog</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">(<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">ID</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">int</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 255);">IDENTITY</span><span style="color: rgb(0, 0, 0);">(</span><span style="font-weight: bold; color: rgb(128, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">,</span><span style="font-weight: bold; color: rgb(128, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)&nbsp;</span><span style="color: rgb(128, 128, 128);">NOT</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">NULL</span><span style="color: rgb(0, 0, 0);">,<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">time</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">datetime</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">NOT</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">NULL</span><span style="color: rgb(0, 0, 0);">,<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">errLevel</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">varchar</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">(</span><span style="font-weight: bold; color: rgb(128, 0, 0);">8</span><span style="color: rgb(0, 0, 0);">)&nbsp;COLLATE&nbsp;Chinese_PRC_CI_AS&nbsp;</span><span style="color: rgb(128, 128, 128);">NOT</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">NULL</span><span style="color: rgb(0, 0, 0);">,<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">info</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">nvarchar</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">(</span><span style="font-weight: bold; color: rgb(128, 0, 0);">200</span><span style="color: rgb(0, 0, 0);">)&nbsp;COLLATE&nbsp;Chinese_PRC_CI_AS&nbsp;</span><span style="color: rgb(128, 128, 128);">NOT</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">NULL</span><span style="color: rgb(0, 0, 0);">,<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">exception</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">varchar</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">(</span><span style="font-weight: bold; color: rgb(128, 0, 0);">1000</span><span style="color: rgb(0, 0, 0);">)&nbsp;COLLATE&nbsp;Chinese_PRC_CI_AS&nbsp;</span><span style="color: rgb(0, 0, 255);">NULL</span><span style="color: rgb(0, 0, 0);">,<br>&nbsp;</span><span style="color: rgb(0, 0, 255);">CONSTRAINT</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">PK_errLog</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">PRIMARY</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">KEY</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">CLUSTERED</span><span style="color: rgb(0, 0, 0);">&nbsp;<br>(<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">ID</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">ASC</span><span style="color: rgb(0, 0, 0);"><br>)</span><span style="color: rgb(0, 0, 255);">WITH</span><span style="color: rgb(0, 0, 0);">&nbsp;(IGNORE_DUP_KEY&nbsp;</span><span style="color: rgb(128, 128, 128);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">OFF</span><span style="color: rgb(0, 0, 0);">)&nbsp;</span><span style="color: rgb(0, 0, 255);">ON</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">PRIMARY</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);"><br>)&nbsp;</span><span style="color: rgb(0, 0, 255);">ON</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(255, 0, 0);">[</span><span style="color: rgb(255, 0, 0);">PRIMARY</span><span style="color: rgb(255, 0, 0);">]</span><span style="color: rgb(0, 0, 0);"><br><br></span><span style="color: rgb(0, 0, 255);">GO</span><span style="color: rgb(0, 0, 0);"><br></span><span style="color: rgb(0, 0, 255);">SET</span><span style="color: rgb(0, 0, 0);">&nbsp;ANSI_PADDING&nbsp;</span><span style="color: rgb(0, 0, 255);">OFF</span></span></div><br>2.把配置文件放到Web目录下，跟web.config同一层。<br><br>3.建立globe.asax文件，在Application_Start中加入<br>
<div class="cnblogs_code"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: rgb(0, 0, 0);">log4net.Config.XmlConfigurator.ConfigureAndWatch(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">&nbsp;System.IO.FileInfo(Server.MapPath(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">~</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)&nbsp;</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(128, 0, 0);">@"</span><span style="color: rgb(128, 0, 0);">\log4net.config</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">));</span></div><br>4.再加入相应的引用。然后如果项目中有其他类库，那么再在对应用到的类库中加入引用。<br>（！！这里需要注意的是，如果用了NHibernate，就需要注意了，必须加入对应版本的log4net，不然会出错。我本来加了一个1.2.9的log4net，但NHibernate默认用附带的1.2.10，运行时就报错了）<br><br>5.实际使用：<br>
<div class="cnblogs_code"><img style="display: none;" id="Code_Closed_Image_101402" onclick="this.style.display='none'; document.getElementById('Code_Closed_Text_101402').style.display='none'; document.getElementById('Code_Open_Image_101402').style.display='inline'; document.getElementById('Code_Open_Text_101402').style.display='inline';" src="contractedblock.gif" align="top" height="16" width="11"><img id="Code_Open_Image_101402" style="display: inline;" onclick="this.style.display='none'; document.getElementById('Code_Open_Text_101402').style.display='none'; getElementById('Code_Closed_Image_101402').style.display='inline'; getElementById('Code_Closed_Text_101402').style.display='inline';" src="expandedblockstart.gif" align="top" height="16" width="11"><span style="display: none;" class="cnblogs_code_Collapse" id="Code_Closed_Text_101402">Code</span><span id="Code_Open_Text_101402" style="display: inline;"><br><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">&nbsp;System;<br></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">&nbsp;log4net;<br></span><span style="color: rgb(0, 0, 255);">namespace</span><span style="color: rgb(0, 0, 0);">&nbsp;DAL<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;summary&gt;</span><span style="color: rgb(0, 128, 0);"><br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;LogHelper&nbsp;的摘要说明<br>&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">&nbsp;</span><span style="color: rgb(128, 128, 128);">&lt;/summary&gt;</span><span style="color: rgb(128, 128, 128);"><br></span><span style="color: rgb(0, 0, 0);">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">&nbsp;LogHelper<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;ILog&nbsp;Logger&nbsp;</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">&nbsp;log4net.LogManager.GetLogger(</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(128, 0, 0);">logger</span><span style="color: rgb(128, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Debug(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;message,&nbsp;Exception&nbsp;ex)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(Logger.IsDebugEnabled)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger.Debug(message,&nbsp;ex);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Debug(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;message)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(Logger.IsDebugEnabled)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger.Debug(message);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Info(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;message,&nbsp;Exception&nbsp;ex)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(Logger.IsInfoEnabled)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger.Info(message,&nbsp;ex);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Info(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;message)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(Logger.IsInfoEnabled)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger.Info(message);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Error(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;message,&nbsp;Exception&nbsp;ex)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(Logger.IsErrorEnabled)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger.Error(message,ex);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">&nbsp;</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">&nbsp;Error(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">&nbsp;message)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">&nbsp;(Logger.IsErrorEnabled)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logger.Error(message);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br>}</span></span></div>
<div id="digg_block">
<div id="div_digg">										
	<div class="diggit" onclick="DiggIt(1544501,59460,1)"> 
		<span class="diggnum" id="digg_count_1544501">0</span>
	</div>
	<div class="buryit" onclick="DiggIt(1544501,59460,2)"> 
		<span class="burynum" id="bury_count_1544501">0</span>
	</div>
	<div class="clear"></div>
	<span style="display: none;" id="span_isdigged_1544501">0</span>	
	<div class="diggword" id="digg_word_1544501">(请您对文章做出评价)</div>	
</div>
</div>
<div class="clear"></div>
<div id="post_next_prev">
<a href="http://www.cnblogs.com/kenkofox/archive/2009/08/08/1541669.html">« </a> 上一篇：<a href="http://www.cnblogs.com/kenkofox/archive/2009/08/08/1541669.html" title="发布于2009-08-08 11:00">NHibernate 如何对session管理，实现lazy=true</a><br>
<a href="http://www.cnblogs.com/kenkofox/archive/2009/08/16/1547066.html">» </a> 下一篇：<a href="http://www.cnblogs.com/kenkofox/archive/2009/08/16/1547066.html" title="发布于2009-08-16 10:25">SQL Server简单使用配置</a><br>
</div>








		</div>
		<div class="postDesc">posted @ 2009-08-12 15:45 <a href="http://www.cnblogs.com/kenkofox/">拂晓风起</a> 阅读(20) <a href="#commentform">评论(0)</a> &nbsp;<a href="http://www.cnblogs.com/kenkofox/admin/EditPosts.aspx?postid=1544501">编辑</a> <a href="http://www.cnblogs.com/kenkofox/AddToFavorite.aspx?id=1544501">收藏</a> <a href="#" onclick="PutInWz();return false;">网摘</a>  所属分类: <a href="http://www.cnblogs.com/kenkofox/category/204517.html">log4net</a></div>
	</div>
	<img src="1544501.html" height="1" width="1">
	
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cnblogs.com/kenkofox/archive/2009/08/12/1544501.html"
dc:identifier="http://www.cnblogs.com/kenkofox/archive/2009/08/12/1544501.html"
dc:title=""
trackback:ping="http://www.cnblogs.com/kenkofox/services/trackbacks/1544501.aspx" />
</rdf:RDF>
-->

</div><!--end: topics 文章、评论容器-->





				
	</div><!--end: topicList 文章列表容器-->

	<div id="sideBar">
		<div id="sideBarMain">
			
<!--done-->
<div class="newsItem">
<h3 class="catListTitle">公告</h3>
	<div id="profile_block"><a href="http://home.cnblogs.com/kenkofox/" target="_top">我的主页</a>&nbsp; <a href="http://home.cnblogs.com/kenkofox/detail/" target="_top">个人资料</a><br><a href="http://home.cnblogs.com/kenkofox/ing/" target="_top">我的闪存</a>&nbsp; <a href="http://space.cnblogs.com/msg/send/%e6%8b%82%e6%99%93%e9%a3%8e%e8%b5%b7" target="_top">发短消息</a></div>
</div>

			<div id="calendar"><table id="Calendar1_entryCal" class="Cal" title="Calendar" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr><td colspan="7"><table class="CalTitle" border="0" cellspacing="0">
		<tbody><tr><td class="CalNextPrev"><a href="javascript:__doPostBack('Calendar1$entryCal','V3469')" style="color: Black;" title="Go to the previous month">&lt;</a></td><td align="center">2009年8月</td><td class="CalNextPrev" align="right"><a href="javascript:__doPostBack('Calendar1$entryCal','V3531')" style="color: Black;" title="Go to the next month">&gt;</a></td></tr>
	</tbody></table></td></tr><tr><th class="CalDayHeader" abbr="日" scope="col" align="center">日</th><th class="CalDayHeader" abbr="一" scope="col" align="center">一</th><th class="CalDayHeader" abbr="二" scope="col" align="center">二</th><th class="CalDayHeader" abbr="三" scope="col" align="center">三</th><th class="CalDayHeader" abbr="四" scope="col" align="center">四</th><th class="CalDayHeader" abbr="五" scope="col" align="center">五</th><th class="CalDayHeader" abbr="六" scope="col" align="center">六</th></tr><tr><td class="CalOtherMonthDay" align="center">26</td><td class="CalOtherMonthDay" align="center">27</td><td class="CalOtherMonthDay" align="center">28</td><td class="CalOtherMonthDay" align="center">29</td><td class="CalOtherMonthDay" align="center">30</td><td class="CalOtherMonthDay" align="center">31</td><td class="CalWeekendDay" align="center">1</td></tr><tr><td class="CalWeekendDay" align="center">2</td><td align="center">3</td><td align="center">4</td><td align="center">5</td><td align="center">6</td><td align="center">7</td><td class="CalWeekendDay" align="center"><a href="http://www.cnblogs.com/kenkofox/archive/2009/8/8.html"><u>8</u></a></td></tr><tr><td class="CalWeekendDay" align="center">9</td><td align="center">10</td><td align="center">11</td><td align="center"><a href="http://www.cnblogs.com/kenkofox/archive/2009/8/12.html"><u>12</u></a></td><td align="center">13</td><td align="center">14</td><td class="CalWeekendDay" align="center">15</td></tr><tr><td class="CalWeekendDay" align="center"><a href="http://www.cnblogs.com/kenkofox/archive/2009/8/16.html"><u>16</u></a></td><td align="center">17</td><td align="center">18</td><td align="center">19</td><td align="center">20</td><td align="center">21</td><td class="CalWeekendDay" align="center">22</td></tr><tr><td class="CalWeekendDay" align="center">23</td><td align="center">24</td><td align="center">25</td><td align="center">26</td><td align="center">27</td><td align="center">28</td><td class="CalWeekendDay" align="center">29</td></tr><tr><td class="CalWeekendDay" align="center">30</td><td align="center">31</td><td class="CalOtherMonthDay" align="center">1</td><td class="CalOtherMonthDay" align="center">2</td><td class="CalOtherMonthDay" align="center">3</td><td class="CalOtherMonthDay" align="center">4</td><td class="CalOtherMonthDay" align="center">5</td></tr>
</tbody></table>
</div>
			
			<div id="leftcontentcontainer">
				

<div class="mySearch">
<h3 class="catListTitle">搜索</h3>
<div class="div_my_zzk"><input value="" id="q" onkeydown="return zzk_go_enter(event);" class="input_my_zzk" type="text">&nbsp;<input onclick="zzk_go()" value="找找看" id="btnZzk" class="btn_my_zzk" type="button"></div>
</div>
<div class="catListLink">
<h3 class="catListTitle">常用链接</h3>
<ul>

		<li><a id="SingleColumn1_ctl02_rptMainLinks_ctl00_lnkLinkItem" href="http://www.cnblogs.com/kenkofox/MyPosts.html">我的随笔</a></li>
	
		<li><a id="SingleColumn1_ctl02_rptMainLinks_ctl01_lnkLinkItem" href="http://home.cnblogs.com/kenkofox/">我的空间</a></li>
	
		<li><a id="SingleColumn1_ctl02_rptMainLinks_ctl02_lnkLinkItem" href="http://space.cnblogs.com/msg/recent">我的短信</a></li>
	
		<li><a id="SingleColumn1_ctl02_rptMainLinks_ctl03_lnkLinkItem" href="http://www.cnblogs.com/kenkofox/MyComments.html">我的评论</a></li>
	
<li><a id="itemListLink" onclick="this.blur();WarpClass('itemListLink', 'itemListLin_con');return false;" href="#">更多链接</a></li>
</ul>
<div id="itemListLin_con" style="display: none;">
<ul>

		<li><a id="SingleColumn1_ctl02_repeaterLinks_ctl00_lnkLinkItem" title="我发表过评论的随笔" href="http://www.cnblogs.com/kenkofox/OtherPosts.html">我的参与</a></li>
	
		<li><a id="SingleColumn1_ctl02_repeaterLinks_ctl01_lnkLinkItem" href="http://www.cnblogs.com/kenkofox/MyNews.html">我的新闻</a></li>
	
		<li><a id="SingleColumn1_ctl02_repeaterLinks_ctl02_lnkLinkItem" href="http://www.cnblogs.com/kenkofox/tag/">我的标签</a></li>
	
</ul>
</div>
</div>
<div class="catListPostCategory">
<h3 class="catListTitle">随笔分类</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_Link" href="http://www.cnblogs.com/kenkofox/category/224108.html">C与C++(4)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_RssLink" title="Subscribe to C与C++(4)" href="http://www.cnblogs.com/kenkofox/category/224108.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_Link" href="http://www.cnblogs.com/kenkofox/category/224109.html">Firefox Extension扩展(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl02_RssLink" title="Subscribe to Firefox Extension扩展(1)" href="http://www.cnblogs.com/kenkofox/category/224109.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_Link" href="http://www.cnblogs.com/kenkofox/category/204517.html">log4net(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl03_RssLink" title="Subscribe to log4net(1)" href="http://www.cnblogs.com/kenkofox/category/204517.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_Link" href="http://www.cnblogs.com/kenkofox/category/203815.html">NHibernate(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl04_RssLink" title="Subscribe to NHibernate(1)" href="http://www.cnblogs.com/kenkofox/category/203815.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_Link" href="http://www.cnblogs.com/kenkofox/category/205204.html">SQL 服务器使用（MySQL，SQL Server等）(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl05_RssLink" title="Subscribe to SQL 服务器使用（MySQL，SQL Server等）(1)" href="http://www.cnblogs.com/kenkofox/category/205204.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_Link" href="http://www.cnblogs.com/kenkofox/category/205220.html">版本控制（VSS）(1)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl06_RssLink" title="Subscribe to 版本控制（VSS）(1)" href="http://www.cnblogs.com/kenkofox/category/205220.html/rss">(rss)</a></li>

<li><a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_Link" href="http://www.cnblogs.com/kenkofox/category/205224.html">暂时不知道怎么分类(4)</a> <a id="SingleColumn1_Categories_CatList_ctl00_LinkList_ctl07_RssLink" title="Subscribe to 暂时不知道怎么分类(4)" href="http://www.cnblogs.com/kenkofox/category/205224.html/rss">(rss)</a></li>

</ul>

</div>

<div class="catListPostArchive">
<h3 class="catListTitle">随笔档案</h3>

<ul>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_Link" href="http://www.cnblogs.com/kenkofox/archive/2009/12.html">2009年12月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl02_Link" href="http://www.cnblogs.com/kenkofox/archive/2009/11.html">2009年11月 (5)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl03_Link" href="http://www.cnblogs.com/kenkofox/archive/2009/10.html">2009年10月 (1)</a> </li>

<li><a id="SingleColumn1_Categories_CatList_ctl01_LinkList_ctl04_Link" href="http://www.cnblogs.com/kenkofox/archive/2009/08.html">2009年8月 (6)</a> </li>

</ul>

</div>



<div class="catListComment">
<h3 class="catListTitle">最新评论<a id="SingleColumn1__13df863_RSSHyperlink1" title="RSS订阅最最新评论" href="http://www.cnblogs.com/kenkofox/CommentsRSS.aspx"><img title="RSS订阅最最新评论" src="xml.gif" style="border-width: 0px;"></a></h3>

	
</div>

<div class="catListView">
<h3 class="catListTitle">阅读排行榜</h3>
	
			<ul>
		
			<li>
				<a id="SingleColumn1_ctl06_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/08/16/1547114.html">1.&nbsp;配置VSS2005（在局域网内搭建服务器）(377)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl06_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/10/17/1584880.html">2.&nbsp;如何查看IIS的80端口被占用？(172)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl06_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/08/08/1541669.html">3.&nbsp;NHibernate 如何对session管理，实现lazy=true(112)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl06_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/11/05/1597052.html">4.&nbsp;C++调用C链接库(74)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl06_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/11/05/1597003.html">5.&nbsp;C调用C++链接库(70)</a>
			</li>
		
			</ul>
		
</div>

<div class="catListFeedback">
<h3 class="catListTitle">评论排行榜</h3>
	
			<ul>
		
			<li>
				<a id="SingleColumn1_ctl07_TopList_ctl01_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/12/17/1626577.html">1.&nbsp;Mozilla Firefox Extension扩展 内幕 教程 源代码分析 安装过程分析（XPInstall，xpcom，rdf，xpi，chrome，manifest）(0)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl07_TopList_ctl02_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/11/29/1613388.html">2.&nbsp;C++ int string 转换(0)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl07_TopList_ctl03_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/11/05/1597053.html">3.&nbsp;C++调用C链接库会出现的问题(0)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl07_TopList_ctl04_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/11/05/1597052.html">4.&nbsp;C++调用C链接库(0)</a>
			</li>
		
			<li>
				<a id="SingleColumn1_ctl07_TopList_ctl05_Hyperlink1" href="http://www.cnblogs.com/kenkofox/archive/2009/11/05/1597003.html">5.&nbsp;C调用C++链接库(0)</a>
			</li>
		
			</ul>
		
</div>

			</div>
			
		</div><!--end: sideBarMain -->
		<div class="clear"></div>
		<div id="footer">
			
<!--done-->
Copyright ©2010 拂晓风起
		</div><!--end: footer -->
	</div><!--end: sideBar 侧边栏容器 -->
</div><!--end: home 自定义的最大容器 -->
</center>
    </form>
	
	
      
    
    
    
</body></html>
